#pragma once
#include<stdio.h>
#include<assert.h>
#include<stdlib.h>
#include<stdbool.h>
typedef int HPdatatype;
typedef struct
{
	HPdatatype* a;
	int size;
	int capacity;

}Heap;

void HeapInit(Heap*hp);
void HeapDestory(Heap* hp);
void HeapPush(Heap* hp, HPdatatype x);
void HeapPop(Heap* hp);
HPdatatype HeapTop(Heap* hp);
int HeapSize(Heap* hp);
bool HeapEmpty(Heap* hp);
void AdjustUp(HPdatatype* a, int child);
void AdjustDown(HPdatatype* a, int parent, int n);
void Swap(HPdatatype* a, HPdatatype* b);
void HeapPrint(Heap* hp);
